package com.example.androidlearning2422.ui.kotlin

fun main(){
    print("Please input:")
    val scores = readln().split(" ").map {it.toInt() }

    print(scoreStatics(scores))
}

fun scoreStatics(scores: List<Int>): Triple<Int, Int ,Int> {
    var a = 0
    var b = 0
    var c = 0
    for (score in scores) when{
            score >= 90 -> a++
            score >= 60 -> b++
            else -> c++
    }
    return Triple(a, b, c)
}